/******************************************************************************* 
 * Copyright (C) 2012-2015 Microfountain Technology, Inc. All Rights Reserved. 
 * 
 * Unauthorized copying of this file, via any medium is strictly prohibited.   
 * Proprietary and confidential
 * 
 * Last Modified: 2015-9-18 15:13:34
 ******************************************************************************/
package cn.com.xy.sms.sdk.util;

import android.content.Context;
import android.content.Intent;

public class AppUtil {

    /*
     * 启动一个app
     */
    public static boolean startAPP(Context ctx, String appPackageName) {
        try {
            Intent intent = ctx.getPackageManager().getLaunchIntentForPackage(
                    appPackageName);
            ctx.startActivity(intent);
        } catch (Throwable e) {
            // Toast.makeText(this, "没有安装", Toast.LENGTH_LONG).show();
            return false;
        }
        return true;
    }

    /* SDK-570 huangzhiqiang 20160802 start */
    public static String assemble() {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < 4; i++) {
            sb.append(DuoquUtils.getCode(i));
        }
        return sb.toString();
    }
    /* SDK-570 huangzhiqiang 20160802 end */
}
